package com.soft.service;

import com.soft.dao.OutWorkDaoImpl;
import com.soft.pojo.Workon;

import java.util.ArrayList;

/**
 * @author ruoxi
 * @create 2021-12-26 15:59
 */
public class OutWorkService {
    private OutWorkDaoImpl outWorkDao = new OutWorkDaoImpl();

    public ArrayList<Workon> findOutWorkByPage(int currentPage,int currentCount){
        return (ArrayList<Workon>) outWorkDao.selectWorkOutByPage(currentPage,currentCount);
    }

    public int findOutWorkCount() {
        return outWorkDao.selectByAll().size();
    }

    public ArrayList<Workon> findOutWorkByDate(String date, int currentPage, int currentCount) {
        return (ArrayList<Workon>) outWorkDao.selectOutWorkerByDate("%"+date+"%", currentPage, currentCount);
    }
}
